package org.hefan.pet.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.hefan.pet.domain.PetType;
import org.hefan.pet.service.IPetTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "宠物类型接口")
@RequestMapping("/petType")
@RestController
public class PetTypeController {

    @Autowired
    private IPetTypeService petTypeService;

    @ApiOperation(value = "查询所有")
    @GetMapping
    public List<PetType> findAll() {
        return petTypeService.loadAll();
    }
}
